<?php
namespace Admin\Controller;
use Think\Controller;

class CommonController extends Controller {
    public function _initialize(){
        if($_SESSION['uid']){
            $this->uid =$_SESSION['uid'];
        }else{
            $url = U('Login/Index');
            header("Location: $url");
        }
    }
}